import request from "@/request";
//调用登录接口
//http://127.0.0.1:9292/api/user/passport/register
export const postRegister = (body)=>request.post('/user/passport/register',body);
//根据手机号获取验证码
//http://127.0.0.1:9292/api/user/passport/sendCode/:phone
export const getCode = phone=>request(`/user/passport/sendCode/${phone}`);
//登录接口
//http://127.0.0.1:9292/api/user/passport/login
export const postLogin = (phone,password)=>request.post('/user/passport/login',{
    phone,
    password
});
//退出登录接口
//http://127.0.0.1:9292/api/user/passport/logout
export const getLogout = ()=>request('/user/passport/logout');
//获取地址信息
//http://127.0.0.1:9292/api/user/userAddress/auth/findUserAddressList
export const getAddressList = ()=>request('/user/userAddress/auth/findUserAddressList');
// 根据ID修改默认地址：http://127.0.0.1:9292/api/user/upUserDefaultAddressList/:_id
export const putUserDefaultAddressById=id=>request.put(`/user/upUserDefaultAddressList/${id}`);